package com.zmm.common.base.model;

import java.io.Serializable;

/**
 * 分页模型类
 * @author 900045
 * @description:
 * @name Paging
 * @date By 2021-06-28 16:02:00
 */
public class Paging implements Serializable {
	
	private static final long serialVersionUID = 9222636841508770479L;

	/**
	 * 当前页
	 */
	private Integer currentPage = 0;

	/**
	 * 总记录条数
	 */
	private Integer totalNumber = 0;

	/**
	 * 总页数
	 */
	private Integer totalPages;

	/**
	 * 分页起始位置
	 */
	private Integer limitStart = 0;

	/**
	 * 单页显示记录数量
	 */
	private Integer limitNum = 10;

	/**
	 * 当前请求时间
	 */
	private Long nowTime;

	public Integer getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}

	public Integer getTotalNumber() {
		return totalNumber;
	}

	public void setTotalNumber(Integer totalNumber) {
		this.totalNumber = totalNumber;
	}

	public Integer getTotalPages() {
		this.totalPages = (this.totalNumber + (this.limitNum - 1)) / this.limitNum;
		return this.totalPages;
	}

	public void setTotalPages(Integer totalPages) {
		this.totalPages = totalPages;
	}

	public Integer getLimitStart() {
		this.limitStart = (this.currentPage) * this.limitNum;
		return this.limitStart;
	}

	public void setLimitStart(Integer limitStart) {
		this.limitStart = limitStart;
	}

	public Integer getLimitNum() {
		return limitNum;
	}

	public void setLimitNum(Integer limitNum) {
		this.limitNum = limitNum;
	}

	public Long getNowTime() {
		return System.currentTimeMillis();
	}

	public void setNowTime(Long nowTime) {
		this.nowTime = nowTime;
	}
}
